package com.umeng.soexample.mvp.view.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.umeng.soexample.R;
import com.umeng.soexample.bean.ShoesEntity;
import com.umeng.soexample.network.API;

public class ShoesAdapter extends BaseQuickAdapter<ShoesEntity.ValuesBean, BaseViewHolder> {
    public ShoesAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShoesEntity.ValuesBean item) {
        ImageView imageView = helper.getView(R.id.iv__item_shoes_values_price_img);
        Glide.with(helper.itemView.getContext()).load(API.BaseUrl + item.goods_img_path).into(imageView);
        helper.setText(R.id.tv_item_shoes_values_price, "￥" + item.goods_discount_price);
        helper.setText(R.id.tv_item_shoes_values_name, item.goods_name);
    }
}
